#ifndef _GLOBAL_CONFIG_H
#define _GLOBAL_CONFIG_H


#include <WString.h>

/* INMP 引脚设置*/
//#define I2S_WS 17
//#define I2S_SD 3
//#define I2S_SCK 18
#define I2S_WS 4
#define I2S_SD 6
#define I2S_SCK 5

#define I2S_PORT_0 I2S_NUM_0
#define SAMPLE_RATE 16000
#define RECORD_TIME_SECONDS 10
#define BUFFER_SIZE (SAMPLE_RATE * RECORD_TIME_SECONDS)




//关于WS2812B
#define PIN_PIXS 48
#define PIX_NUM 1



#define CHUNK_SIZE 2048


#if 0
constexpr int recordTimeSeconds = 3;//录音时间秒为单位
//int16_t audioData[2560];
//int16_t *pcm_data; // 录音缓存区
//uint recordingSize = 0;

constexpr char *ssid = "H3C_201";
constexpr char *password = "cy0515cy0515";

// 讯飞STT 的key
constexpr String STTAPPID = "99d038";
constexpr char *STTAPISecret = "YzMxNGRkODJlNjVjMDUZTc5MjFh";
constexpr char *STTAPIKey = "aa09fe34b2c3d8c327222463f8e74";

//NTP 授时
constexpr char *ntpServer1 = "ntp.org";
constexpr char *ntpServer2 = "ntp.ntsc.ac.cn";
constexpr long gmtOffset_sec = 3600;
constexpr int daylightOffset_sec = 3600;
#endif

#if 0
// 使用 inline 关键字
inline constexpr int recordTimeSeconds = 3;

inline const char* ssid = "H3C_201";
inline const char* password = "cy0515cy0515";

// 讯飞STT 的key
inline const String STTAPPID = "99d038";
inline const char* STTAPISecret = "YzMxNGRkODJlNjVjMDUZTc5MjFh";
inline const char* STTAPIKey = "aa09fe34b2c3d8c327222463f8e74";

//NTP 授时
inline const char* ntpServer1 = "ntp.org";
inline const char* ntpServer2 = "ntp.ntsc.ac.cn";
inline constexpr long gmtOffset_sec = 3600;
inline constexpr int daylightOffset_sec = 3600;
#endif 


#if 1
// 使用 static const
static const int recordTimeSeconds = 3;

static const char* ssid = "H3C_201";
static const char* password = "cy0515cy0515";

// 讯飞STT 的key
static const String STTAPPID = "5d9dd4e5";
static const char* STTAPISecret = "YjQyZDJiMjY3ZWFmNGUxZGNlODk1OTIz";
static const char* STTAPIKey = "caac28fe0d2d2ea47f1cdb7930951ee7";

//NTP 授时
static const char* ntpServer1 = "ntp.org";
static const char* ntpServer2 = "ntp.ntsc.ac.cn";
static const long gmtOffset_sec = 3600;
static const int daylightOffset_sec = 3600;
#endif 


#if 0
// 使用宏定义（不占用内存，直接替换）
#define RECORD_TIME_SECONDS 3
#define WIFI_SSID "H3C_201"
#define WIFI_PASSWORD "cy0515cy0515"

// 讯飞STT 的key
#define STT_APPID "99d038"
#define STT_API_SECRET "YzMxNGRkODJlNjVjMDUZTc5MjFh"
#define STT_API_KEY "aa09fe34b2c3d8c327222463f8e74"

// NTP 授时
#define NTP_SERVER1 "ntp.org"
#define NTP_SERVER2 "ntp.ntsc.ac.cn"
#define GMT_OFFSET_SEC 3600
#define DAYLIGHT_OFFSET_SEC 3600
#endif 

#endif


